package controller;

import gui.IndexUI;
import gui.RegisterUI;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;

public class RegisterWindowEvent extends WindowAdapter {

	private RegisterUI gui;

	public RegisterWindowEvent(RegisterUI gui) {
		this.gui = gui;
		this.gui.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
	}

	@Override
	public void windowClosing(WindowEvent e) {
		this.gui.setVisible(false);
		IndexUI.getInsntace().setVisible(true);
	}

}
